<div class="fsh-pop">
    <div id="add_form" class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label"><i>*</i>名称</label>
            <div class="layui-input-block">
                <input type="text" name="permissionName" lay-verify="required" placeholder="请输入内容" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>菜单编号</label>
            <div class="layui-input-block">
                <input name="permissionKey"  lay-verify="required" placeholder="请输入内容" class="layui-input">
            </div>
        </div>
         <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>父级菜单</label>
            <div class="layui-input-block">
                    <input   name="parent_key"  lay-verify="required" autocomplete="off" placeholder="请选择父级菜单" class="layui-input" id="parent_key">
                    <input  type="hidden" name="parent_keys"  id="parent_keys">

            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>请求地址</label>
            <div class="layui-input-block">
                <input name="url"  lay-verify="required" placeholder="请输入内容" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input name="sort"   placeholder="请输入内容" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">请求方式</label>
            <div class="layui-input-block">
                <input name="method" placeholder="请输入内容" class="layui-input">
            </div>
        </div>

  </div>
</div>
<script>

   $("#parent_key").click(function(){
    showDialog({
                title: '选择父级菜单'
                ,template: 'views/system/menu/template/menu.html'
                ,width:400
                ,height:600
                , yes: function (index, layero) {
                    var res = callbackdata(); 
                    layer.close(index);
                    $("#parent_key_name").val(res.title);
                    $("#parent_key").val(res.key);
                    $("#parent_keys").val(res.keys);
                }

            });

   });

</script>
